package com.yuezhi.inv.controller;


import com.yuezhi.inv.entity.Stock;
import com.yuezhi.inv.service.CommodityBillService;
import com.yuezhi.inv.service.StockService;
import com.yuezhi.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author boys
 * @since 2020-12-21
 */
@RestController
@RequestMapping("/inv/stock")
public class StockController {

    @Autowired
    private StockService stockService;

    @GetMapping("")
    public R stockList(String depotId,String commId){
        List<Stock> stocks = stockService.queryStockByDepotAndCommon(depotId, commId);
        return R.success().data("stockList",stocks).data("count",stocks.size());
    }


}

